# class Person:
#     def __init__(self, name):
#         self.name = name
#
#     @staticmethod  # 把eat方法变为静态方法之后，无法访问到实例化的属性
#     def eat(cls):
#         print("%s is eating" % cls)
#
#
# per = Person("king")
# per.eat("王勇")

# class Person(object):
#     name = "wangyong"
#     dateStartTime = '1970-1-1 00:00:00'
#     number = 10
#
#     def __init__(self, name):
#         self.name = name
#
#     @classmethod  # 把eat方法变为类方法
#     def eat(cls):
#         print("%s is eating" % cls.name)
#
#     @classmethod
#     def sum(cls, age):
#         return cls.number + age
#
#
# per = Person('king')
# per.eat()
# age1 = per.sum(10)
# print(age1)

class Person(object):

    def __init__(self, name):
        self.name = name

    @property  # 把eat方法变为属性方法
    def eat(self):
        print("%s is eating" % self.name)


per = Person("wangyong")
per.eat
